package com.blueheart.music.mapper;

import com.blueheart.music.model.pojo.ListSong;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ListSongMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ListSong record);

    int insertSelective(ListSong record);

    ListSong selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ListSong record);

    int updateByPrimaryKey(ListSong record);

    /**
     * 查询全部歌单中的歌曲
     * @return
     */
    List<ListSong> selectAll();

    /**
     * 根据歌曲id查询歌单
     * @param songId
     * @return
     */
    List<ListSong> selectBySongId(Integer songId);

    /**
     * 根据歌单id查询歌曲
     * @param songListId
     * @return
     */
    List<ListSong> selectBySongListId(Integer songListId);

}